<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>v-pre & v-cloak & v-once</title>
  <script src="../assets/js/vue.js"></script>
</head>
<body>
  <h1>v-pre & v-cloak & v-once</h1>
  <hr>
  <div id="app">
    <div v-pre>{{ message }}</div>
    <div v-cloak>渲染完成之后才显示</div>
    <br>
    <!-- 只是第一次渲染，后面DOM内容变化时也不跟随变化了 -->
    <div v-once>{{ message }}</div>
    <input type="text" v-model="message">
    <div>{{ message }}</div>
  </div>
  <script>
    var vue = new Vue({
      el: '#app',
      data: {
        message: '原样输出'
      }
    })
  </script>
</body>
</html>